<html>
<head><meta charset="utf-8"><title>Binder&lt;&#x27;tcx, T&gt; -&gt; Binder&lt;T: CanBeBound&gt; · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html">Binder&lt;&#x27;tcx, T&gt; -&gt; Binder&lt;T: CanBeBound&gt;</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="229745390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229745390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229745390">(Mar 10 2021 at 21:11)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span></p>



<a name="229745500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229745500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229745500">(Mar 10 2021 at 21:12)</a>:</h4>
<p>so I was wondering ... why don't we go first after the <code>HasInterner</code> migration?</p>



<a name="229745583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229745583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229745583">(Mar 10 2021 at 21:12)</a>:</h4>
<p>yeah, I think that we can't do the <code>CanBeBound</code> without it</p>



<a name="229746784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229746784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229746784">(Mar 10 2021 at 21:20)</a>:</h4>
<p>in that case, what would be required to do the <code>HasInterner</code> change?</p>



<a name="229746818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229746818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229746818">(Mar 10 2021 at 21:20)</a>:</h4>
<p>do you guys know more or less? or can give me a high level picture?</p>



<a name="229746891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229746891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229746891">(Mar 10 2021 at 21:20)</a>:</h4>
<p>I can also try to figure that out but would be nice to know if we are also far from making that change or if it's something doable :)</p>



<a name="229747050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229747050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229747050">(Mar 10 2021 at 21:21)</a>:</h4>
<p>hmm</p>



<a name="229747153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229747153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229747153">(Mar 10 2021 at 21:22)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> probably has a clearer picture there</p>



<a name="229747365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229747365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229747365">(Mar 10 2021 at 21:24)</a>:</h4>
<p>Right, so <code>CanBeBound</code> is roughly the same has <code>HasInterner</code></p>



<a name="229747500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229747500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229747500">(Mar 10 2021 at 21:24)</a>:</h4>
<p>But there potentially might be a smaller subset of things we might need to impl <code>CanBeBound</code> vs <code>HasInterner</code>, if we're just looking at <code>Binder</code></p>



<a name="229747538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229747538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229747538">(Mar 10 2021 at 21:25)</a>:</h4>
<p>But it might just make sense to start on the <code>HasInterner</code>/ <code>Interner</code></p>



<a name="229747891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229747891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229747891">(Mar 10 2021 at 21:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/Binder.3C'tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E/near/229747365">said</a>:</p>
<blockquote>
<p>Right, so <code>CanBeBound</code> is roughly the same has <code>HasInterner</code></p>
</blockquote>
<p>the thing is, we don't have associated lifetimes</p>



<a name="229747899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229747899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229747899">(Mar 10 2021 at 21:28)</a>:</h4>
<p>so it really has to be an associated <em>type</em></p>



<a name="229747959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229747959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229747959">(Mar 10 2021 at 21:28)</a>:</h4>
<p>which really wants to be <code>TyCtxt&lt;'tcx&gt;</code> or whatever</p>



<a name="229748564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229748564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229748564">(Mar 10 2021 at 21:32)</a>:</h4>
<p>Right, <code>CanBeBound</code> would be like <code>trait CanBeBound { type BoundVariableKinds; }</code></p>



<a name="229751065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229751065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229751065">(Mar 10 2021 at 21:47)</a>:</h4>
<p>so <span class="user-mention" data-user-id="255061">@Léo Lanteri Thauvin</span> had prepared some PRs, right</p>



<a name="229751083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229751083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229751083">(Mar 10 2021 at 21:47)</a>:</h4>
<p>for moving things out into a separate library</p>



<a name="229751101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229751101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229751101">(Mar 10 2021 at 21:47)</a>:</h4>
<p>what's the current status of that work? Seems like something <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> could continue</p>



<a name="229751870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229751870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229751870">(Mar 10 2021 at 21:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/Binder.3C'tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E/near/229748564">said</a>:</p>
<blockquote>
<p>Right, <code>CanBeBound</code> would be like <code>trait CanBeBound { type BoundVariableKinds; }</code></p>
</blockquote>
<p>I kept wondering is this what we want or we want just to go straight to <code>Internet</code>/<code>HasInternet</code> and map that to <code>TyCtxt&lt;'tcx&gt;</code> from Rustc?</p>



<a name="229752246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229752246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229752246">(Mar 10 2021 at 21:55)</a>:</h4>
<p>I'm pretty sure all of the existing PRs have been merged (from a quick look, I didn't find any). <span class="user-mention" data-user-id="125131">@detrumi</span> and <span class="user-mention" data-user-id="283967">@Zahari Dichev</span> have been doing some work in <a href="https://github.com/rust-lang/rust/compare/master...zaharidichev:move-encodable-to-type-ir">https://github.com/rust-lang/rust/compare/master...zaharidichev:move-encodable-to-type-ir</a> to help with moving out <code>Encodable</code>/<code>Decodable</code> - or, at least making it so we can generate the impls in <code>rustc_type_ir</code></p>



<a name="229752318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229752318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229752318">(Mar 10 2021 at 21:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/Binder.3C'tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E/near/229751870">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/Binder.3C'tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E/near/229748564">said</a>:</p>
<blockquote>
<p>Right, <code>CanBeBound</code> would be like <code>trait CanBeBound { type BoundVariableKinds; }</code></p>
</blockquote>
<p>I kept wondering is this what we want or we want just to go straight to <code>Internet</code>/<code>HasInternet</code> and map that to <code>TyCtxt&lt;'tcx&gt;</code> from Rustc?</p>
</blockquote>
<p>Probably just <code>Interner</code>/<code>HasInterner</code></p>



<a name="229752794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Binder%3C%27tcx%2C%20T%3E%20-%3E%20Binder%3CT%3A%20CanBeBound%3E/near/229752794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Binder.3C&#x27;tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E.html#229752794">(Mar 10 2021 at 21:59)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/Binder.3C'tcx.2C.20T.3E.20-.3E.20Binder.3CT.3A.20CanBeBound.3E/near/229752246">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="125131">detrumi</span> and <span class="user-mention silent" data-user-id="283967">Zahari Dichev</span> have been doing some work in <a href="https://github.com/rust-lang/rust/compare/master...zaharidichev:move-encodable-to-type-ir">https://github.com/rust-lang/rust/compare/master...zaharidichev:move-encodable-to-type-ir</a> to help with moving out <code>Encodable</code>/<code>Decodable</code> - or, at least making it so we can generate the impls in <code>rustc_type_ir</code></p>
</blockquote>
<p>Yes, that's almost at the point where we can start moving the types themselves</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>